Skip to content

Conversation

@yasserahmed10
Copy link
Contributor

This pull request includes updates to the CSV parsing logic, enhancements to existing repository tests, and the addition of new test cases for AuditLogRepositoryImpl, ProjectsRepositoryImpl, and TaskRepositoryImpl. The most important changes are grouped below by theme.

CSV Parsing Enhancements:

  • Updated the CSV parsing logic in UserCsvParser to handle cases where the number of fields in a line might exceed the expected limit. The split method now uses a limit of 6, and additional checks ensure safe access to optional fields like projectIds and taskIds.
  • Improved the toStringList extension function to trim strings before processing, ensuring cleaner data parsing.

Test Additions for Repositories:

  • AuditLogRepositoryImpl: Added comprehensive test coverage for methods like getAllLogsByTaskId and getAllLogsByProjectId, ensuring proper delegation to the data source and validation of returned data.
  • ProjectsRepositoryImpl: Introduced tests for critical methods such as addProject, updateProject, deleteProject, and getAllProjectsByUser, including validation of admin privilege checks and exception handling for edge cases.
  • TaskRepositoryImpl: Added tests to validate functionality for retrieving tasks by ID, by project ID, and all tasks, ensuring accurate mapping and delegation to the data source.

@yasserahmed10 yasserahmed10 self-assigned this May 18, 2025
@yasserahmed10 yasserahmed10 added enhancement New feature or request test cases Work on Testcases labels May 18, 2025
Copy link
Member

@Ahmedsayed0895 Ahmedsayed0895 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Copy link
Contributor

@Moha-ALjabouri Moha-ALjabouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

@yasserahmed10 yasserahmed10 merged commit 3e62308 into development May 18, 2025
2 of 3 checks passed
@yasserahmed10 yasserahmed10 deleted the improve-testing branch May 18, 2025 16:49
@github-actions
Copy link

❌ Test or Coverage checks failed! Please check the workflow run for details.

@github-actions
Copy link

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2024.3.4
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request test cases Work on Testcases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants